home *** CD-ROM | disk | FTP | other *** search
/ Sprite 1984 - 1993 / Sprite 1984 - 1993.iso / src / cmds / tcsh / dist / Makefile.sun4 < prev    next >
Encoding:
Makefile  |  1992-12-18  |  12.4 KB  |  405 lines

  1. # $Id: Makefile.ds3100,v 1.1 92/12/18 15:20:07 jhh Exp $
  2. #    Makefile    4.3    6/11/83
  3. #
  4. # C Shell with process control; VM/UNIX VAX Makefile
  5. # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
  6. #
  7. # With an input editor, command completion, etc. and ported to all sorts of
  8. # things; Paul Placeway, CIS Dept., Ohio State University
  9. #
  10. SHELL=/bin/sh
  11. VERSION=6.01
  12. BUILD=tcsh
  13.  
  14. ################################################################
  15. ## CFLAGS.  For various -D things, see config.h
  16. ################################################################
  17. #
  18. # These are the default suffixes from .c to .o and -c to get there
  19. # but to use the global optimizer on the mips boxes, see below
  20. #
  21. SUF=o
  22. CF=-c
  23.  
  24. INCLUDES=-I. -I.. -I/sprite/lib/include/sun4.md -I/sprite/lib/include
  25.  
  26. LFLAGS=$(INCLUDES)
  27. #LFLAGS=$(INCLUDES) -Zn10000        # hpux lint
  28.  
  29.  
  30. #CFLAGS= $(INCLUDES) -g            # debug
  31. #CFLAGS= $(INCLUDES) -O            # production
  32. #CFLAGS= $(INCLUDES)             # Broken optimizers....
  33.  
  34. #CFLAGS= -g -pg $(INCLUDES) -DPROF
  35. #CFLAGS= -O -pg $(INCLUDES) -DPROF
  36.  
  37. # gcc 1.37-
  38. CFLAGS=-O $(INCLUDES) -finline-functions -fstrength-reduce -Usun -Usparc
  39.  
  40. # gcc 1.37+
  41. #CFLAGS=-O $(INCLUDES) -fcombine-regs -finline-functions -fstrength-reduce 
  42. # add -msoft-float for 68881 machines.
  43.  
  44. #hpux 8.0
  45.  
  46. #CFLAGS=  $(INCLUDES) +O3 -Aa
  47.  
  48. # for silicon graphics (and other mips compilers) -- use the
  49. # global optimizer! (-O3).
  50. # On SGI 4.0+ you need to add -D__STDC__ too.
  51. #CFLAGS= -O3 $(INCLUDES) 
  52. #CF=-j
  53. #SUF=u
  54. #.SUFFIXES: .u                 ## Ultrix needs that
  55.  
  56. # mips systems
  57. #CFLAGS= $(INCLUDES) -O -systype bsd43 -Wf,-XNd5000 -Wf,-XNp6000 -Olimit 2000 -Dsprite -Uultrix
  58.  
  59. # for at&t machines
  60. #CFLAGS= -O -Ksd $(INCLUDES)
  61.  
  62. # for convexen
  63. #CFLAGS= $(INCLUDES) -ext -tm c1
  64.  
  65. # Stardent Titan
  66. #CFLAGS = $(INCLUDES) -O -43
  67.  
  68. # Stardent Stellar
  69. #CFLAGS = $(INCLUDES) -O4
  70.  
  71. # Apollo's with cc [apollo builtins don't work with gcc]
  72. # and apollo should not define __STDC__ if it does not have
  73. # the standard header files. RT's (aos4.3) need that too;
  74. # you might want to skip the -O on the rt's... Not very wise.
  75. # AIX/ESA needs -D_IBMESA on command line (this may disappear by GA)
  76. #DFLAGS=-U__STDC__ 
  77. #DFLAGS=-D_IBMESA
  78. # On aix2.2.1 we need more compiler space.
  79. #DFLAGS=-Nd4000 -Nn3000
  80. DFLAGS=
  81.  
  82.  
  83. ################################################################
  84. ## LDLAGS.  Define something here if you need to
  85. ################################################################
  86. LDFLAGS=             ## The simplest, suitable for all.
  87. #LDFLAGS= -s            ## Stripped. Takes less space on disk.
  88. #LDFLAGS= -s -n            ## Pure executable. Spares paging over
  89. #                 ## the network for machines with local
  90. #                ## swap but external /usr/local/bin .
  91. #LDFLAGS= -s -n -Bstatic    ## Without dynamic links. (SunOS)
  92.  
  93. ################################################################
  94. ## LIBES.  Pick one, or roll your own.
  95. ################################################################
  96. LIBES= -ltermcap        ## BSD style things, hpux
  97. #LIBES= -ltermcap -lcs        ## Mach
  98. #LIBES= -lcurses        ## Sys V3 w/o networking (and Sys V4)
  99. #LIBES= -lcurses -lc /usr/ucblib/libucb.a ## Sys V4 with BSDTIMES
  100. #LIBES= -lcurses        ## Sys V4 w/o BSDTIMES
  101. #LIBES= -lcurses -lnet        ## Sys V3 with networking
  102. #LIBES= -lcurses -ldir        ## Sys V2 w/o networking [needs directory lib]
  103. #LIBES= -lcurses -ldir -lnet    ## Sys V2 with networking [needs directory lib]
  104. #LIBES= -lcurses -lsocket -lbsd    ## Amdahl UTS 2.1
  105. #LIBES= -lcurses -lbsd        ## For Irix3.1 on SGI-IRIS4D or ETA10
  106. #LIBES= -lcurses -lsun -lbsd -lc_s ## For Irix3.3 on SGI-IRIS4D (w/ yp)
  107. #LIBES= -lcurses -lbsd -lc_s    ## For Irix3.3 on SGI-IRIS4D (wo/ yp)
  108. #LIBES= -lcurses -lbsd        ## For aix on an IBM 370 or rs6000 or ps2
  109. #LIBES= -lcurses        ## For aix on the rt
  110. #LIBES= -lcurses -lcposix    ## ISC 2.2 
  111. #LIBES= -lcposix -lc_s -lcurses -linet ## ISC 2.2 with networking
  112. #LIBES= -lcurses -linet -lc_s   ## ISC 2.0.2 with networking
  113. #LIBES= -ltermcap -ldir -lx    ## Xenix 386 style things
  114. #LIBES= -lcurses -lintl        ## SCO SysVR3.2v2.0
  115. #LIBES= -lcurses -lintl -lsocket ## SCO+ODT1.1
  116. #LIBES= -lposix -ltermcap    ## A/UX 2.0
  117. #LIBES= -ltermcap -lseq        ## Sequent's Dynix
  118. #LIBES= -lcurses -lsocket    ## Intel's hypercube and ns32000 based Opus.
  119. #LIBES= -ldirent -lcurses       ## att3b1 stk cc w/o shared lib & directory lib
  120. #LIBES= -shlib -ldirent -lcurses ## att3b1 gcc1.40 w/ shared lib & directory lib
  121. #LIBES=                ## Minix.
  122. #LIBES= -lcurses        ## For a stellar
  123.  
  124.  
  125. # The difficult choice of a c-compiler...
  126. # First, you should try your own c-compiler. 
  127. # Gcc -traditional is also a safe choice. 
  128. # If you think that you have good include files try gcc -Wall...
  129. # If you want to take out -traditional, make sure that your sys/ioctl.h
  130. # is fixed correctly, otherwise you'll be stopped for tty input!
  131. #CC=    gcc -Wall 
  132. CC=    cc
  133. #CC=    occ
  134. #CC=    /bin/cc    # For suns, w/o gcc and SVR4
  135. #CC=    /usr/lib/sun.compile/cc  # FPS 500 (+FPX) with Sun C compiler
  136. ED=    -ed
  137. AS=    -as
  138. RM=    -rm
  139. CXREF=    /usr/ucb/cxref
  140. VGRIND=    csh /usr/ucb/vgrind
  141. CTAGS=    /usr/ucb/ctags
  142. #XSTR= /usr/ucb/xstr
  143. SCCS=    /usr/local/sccs
  144. PARALLEL=12                # Make the multi-max run fast.
  145. #P=&                    # Use Sequent's parallel make
  146. P=
  147. DESTDIR=/sprite
  148. MANSECT=1
  149. DESTBIN=${DESTDIR}/cmds
  150. DESTMAN=${DESTDIR}/man/cmds
  151. FTPAREA=/usr/spool/ftp
  152.  
  153. ASSRCS=    sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
  154.     sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
  155.     sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
  156.     sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h 
  157. PSSRCS= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h
  158. SHSRCS= ${ASSRCS} ${PSSRCS}
  159. SHOBJS=    sh.${SUF} sh.dir.${SUF} sh.dol.${SUF} sh.err.${SUF} sh.exec.${SUF} \
  160.     sh.char.${SUF} sh.exp.${SUF} sh.func.${SUF} sh.glob.${SUF} \
  161.     sh.hist.${SUF} sh.init.${SUF} sh.lex.${SUF} sh.misc.${SUF} \
  162.     sh.parse.${SUF} sh.print.${SUF} sh.proc.${SUF} sh.sem.${SUF} \
  163.     sh.set.${SUF} sh.time.${SUF} glob.${SUF} mi.termios.${SUF}
  164.  
  165. TWSRCS= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c
  166. TWOBJS=    tw.help.${SUF} tw.init.${SUF} tw.parse.${SUF} tw.spell.${SUF}
  167.  
  168. EDSRCS= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
  169.     ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
  170. EDOBJS=    ed.chared.${SUF} ed.refresh.${SUF} ed.screen.${SUF} ed.init.${SUF} \
  171.     ed.inputl.${SUF} ed.defns.${SUF} ed.xmap.${SUF} ed.term.${SUF}
  172.  
  173. TCSRCS= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
  174.     tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
  175.     tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
  176.     tc.who.c tc.h
  177. TCOBJS=    tc.alloc.${SUF} tc.bind.${SUF} tc.const.${SUF} tc.disc.${SUF} \
  178.     tc.func.${SUF} tc.os.${SUF} tc.printf.${SUF} \
  179.     tc.prompt.${SUF} tc.sched.${SUF} tc.sig.${SUF} tc.str.${SUF} \
  180.     tc.vers.${SUF} tc.who.${SUF} 
  181.  
  182. PVSRCS= Makefile
  183. AVSRCS= Fixes MAKEDIFFS MAKESHAR NewThings README FAQ \
  184.     WishList config_f.h eight-bit.me glob.3 patchlevel.h \
  185.     pathnames.h tcsh.man Ported src.desc Imakefile imake.config \
  186.     README.imake
  187. VHSRCS=${PVSRCS} ${AVSRCS}
  188.  
  189. CONFSRCS=config/config.* 
  190.  
  191. ALLSRCS=  ${SHSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${VHSRCS}
  192. DISTSRCS= ${PSSRCS} ${TWSRCS} ${EDSRCS} ${TCSRCS} ${AVSRCS}
  193.  
  194.  
  195. OBJS= ${SHOBJS} ${TWOBJS} ${EDOBJS} ${TCOBJS}
  196.  
  197.  
  198. all: ${BUILD}
  199.  
  200. tcsh:$(P) ${OBJS} 
  201.     rm -f tcsh core
  202.     ${CC} ${LDFLAGS} ${CFLAGS} ${OBJS} -o tcsh ${LIBES}
  203.  
  204. tcsh.ps: tcsh.1
  205.     rm -f tcsh.ps
  206.     -ptroff -man tcsh.1 > tcsh.ps
  207.  
  208.  
  209. .c.${SUF}:
  210.     ${CC} ${CF} ${CFLAGS} ${DFLAGS} $<
  211.  
  212. # Don't do any special massaging of C files for sharing of strings!!
  213. # it causes weird segmentation faults on some systems.
  214. #.c.o:
  215. #    ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  216. #    ${CC} ${CF} ${CFLAGS} x.c 
  217. #    mv -f x.o $*.o
  218. #    rm -f x.c
  219.  
  220. #ed.init.o: ed.init.c
  221. #    ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
  222. #    ${CC} -R ${CF} ${CF} x.c 
  223. #    mv -f x.o $*.o
  224. #    rm -f x.c
  225.  
  226. #strings.o: strings
  227. #    ${XSTR}
  228. #    ${CC} -c -R xs.c
  229. #    mv -f xs.o strings.o
  230. #    rm -f xs.c
  231.  
  232. ##.DEFAULT:
  233. ##    ${SCCS} get $<
  234.  
  235. ##.DEFAULT:
  236. ##    co $<
  237.  
  238. ed.defns.h: ed.defns.c
  239.     @rm -f $@
  240.     @echo '/* Do not edit this file, make creates it. */' > $@
  241.     @echo '#ifndef _h_ed_defns' >> $@
  242.     @echo '#define _h_ed_defns' >> $@
  243.     egrep '[FV]_' ed.defns.c | egrep '^#define' >> $@
  244.     @echo '#endif /* _h_ed_defns */' >> $@
  245.  
  246. sh.err.h: sh.err.c
  247.     @rm -f $@
  248.     @echo '/* Do not edit this file, make creates it. */' > $@
  249.     @echo '#ifndef _h_sh_err' >> $@
  250.     @echo '#define _h_sh_err' >> $@
  251.     egrep 'ERR_' sh.err.c | egrep '^#define' >> $@
  252.     @echo '#endif /* _h_sh_err */' >> $@
  253.  
  254. tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h
  255.     @rm -f $@
  256.     @echo '/* Do not edit this file, make creates it. */' > $@
  257.     ${CC} -E $(INCLUDES) ${DFLAGS} tc.const.c | egrep 'Char STR' | \
  258.         sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
  259.         sort >> $@
  260.  
  261. csh.prof: ${OBJS} sh.prof.${SUF} mcrt0.${SUF}
  262.     rm -f csh.prof
  263.     ld -X mcrt0.${SUF} ${OBJS} -o csh.prof ${LIBES} -lc
  264.  
  265. sh.prof.${SUF}:
  266.     cp sh.c sh.prof.c
  267.     ${CC} ${CF} ${CFLAGS} -DPROF sh.prof.c
  268.  
  269. lint: tc.const.h ed.defns.h
  270.     lint ${LFLAGS} sh*.c tw*.c ed*.c tc.*.c ${LIBES}
  271.  
  272. print:
  273.     @pr READ_ME
  274.     @pr makefile makefile.*
  275.     @(size -l a.out; size *.${SUF}) | pr -h SIZES
  276.     @${CXREF} sh*.c | pr -h XREF
  277.     @ls -l | pr 
  278.     @pr sh*.h [a-rt-z]*.h sh*.c alloc.c
  279.  
  280. vprint:
  281.     @pr -l84 READ_ME TODO
  282.     @pr -l84 makefile makefile.*
  283.     @(size -l a.out; size *.${SUF}) | pr -l84 -h SIZES
  284.     @${CXREF} sh*.c | pr -l84 -h XREF
  285.     @ls -l | pr -l84
  286.     @${CXREF} sh*.c | pr -l84 -h XREF
  287.     @pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c
  288.  
  289. vgrind:
  290.     @cp /dev/null index
  291.     @for i in *.h; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
  292.     @for i in *.c; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
  293.     @vgrind -t -x -h Index index >/crp/bill/csh/index.t
  294.  
  295. install: tcsh 
  296.     update -m 775 -b ${DESTBIN}.old tcsh ${DESTBIN}
  297.     strip ${DESTBIN}/tcsh
  298.  
  299. manpage: tcsh.man
  300.     cp tcsh.man ${DESTMAN}
  301.     chmod 444 ${DESTMAN}/tcsh.man
  302.  
  303. clean:
  304.     ${RM} -f a.out strings x.c xs.c tcsh _MAKE_LOG core
  305.     ${RM} -f *.${SUF} sh.prof.c ed.defns.h tc.const.h sh.err.h
  306.  
  307. veryclean: clean
  308.     ${RM} -f *~ #*
  309.  
  310. tags:    /tmp
  311.     ${CTAGS} sh*.c
  312.  
  313. tar:
  314.     rm -f tcsh-${VERSION}.tar.Z
  315.     rm -rf tcsh-${VERSION} 
  316.     mkdir tcsh-${VERSION} tcsh-${VERSION}/config
  317.     cp ${ALLSRCS} tcsh-${VERSION}
  318.     cp ${CONFSRCS} tcsh-${VERSION}/config
  319.     tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
  320.     rm -rf tcsh-${VERSION}
  321.  
  322. shar:    
  323.     rm -f tcsh-*.shar
  324.     rm -rf tcsh-${VERSION} 
  325.     mkdir tcsh-${VERSION} tcsh-${VERSION}/config 
  326.     cp ${ALLSRCS} tcsh-${VERSION}
  327.     cp ${CONFSRCS} tcsh-${VERSION}/config
  328.     MAKESHAR ${VERSION} tcsh-${VERSION}/* tcsh-${VERSION}/config/*
  329.     rm -rf tcsh-${VERSION}
  330.  
  331. tcsh-${VERSION}.tar.Z:
  332.     rm -rf tcsh-${VERSION} 
  333.     rm -f tcsh-${VERSION}.tar tcsh-${VERSION}.tar.Z DIFFS.[123]
  334.     mkdir tcsh-${VERSION}
  335.     ./MAKEDIFFS bsd
  336.     mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh-${VERSION}
  337.     cp ${DISTSRCS} tcsh-${VERSION}
  338.     mkdir tcsh-${VERSION}/config
  339.     cp ${CONFSRCS} tcsh-${VERSION}/config
  340.     cp Makefile tcsh-${VERSION}/Makefile.new
  341.     tar cvf - tcsh-${VERSION} | compress > tcsh-${VERSION}.tar.Z
  342.     rm -rf tcsh-${VERSION}
  343.  
  344. tcsh.tahoe-${VERSION}.tar.Z:
  345.     rm -rf tcsh.tahoe-${VERSION} 
  346.     rm -f tcsh.tahoe-${VERSION}.tar tcsh.tahoe-${VERSION}.tar.Z DIFFS.[123]
  347.     mkdir tcsh.tahoe-${VERSION}
  348.     ./MAKEDIFFS tahoe
  349.     mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.tahoe-${VERSION}
  350.     cp ${DISTSRCS} tcsh.tahoe-${VERSION}
  351.     mkdir tcsh.tahoe-${VERSION}/config
  352.     cp ${CONFSRCS} tcsh.tahoe-${VERSION}/config
  353.     cp Makefile tcsh.tahoe-${VERSION}/Makefile.new
  354.     tar cvf - tcsh.tahoe-${VERSION} | compress > tcsh.tahoe-${VERSION}.tar.Z
  355.     rm -rf tcsh.tahoe-${VERSION}
  356.  
  357. tcsh.reno-${VERSION}.tar.Z:
  358.     rm -rf tcsh.reno-${VERSION} 
  359.     rm -f tcsh.reno-${VERSION}.tar tcsh.reno-${VERSION}.tar.Z DIFFS.[123]
  360.     mkdir tcsh.reno-${VERSION}
  361.     ./MAKEDIFFS reno
  362.     mv DIFFS.1 DIFFS.2 DIFFS.3 tcsh.reno-${VERSION}
  363.     cp ${DISTSRCS} tcsh.reno-${VERSION}
  364.     mkdir tcsh.reno-${VERSION}/config
  365.     cp ${CONFSRCS} tcsh.reno-${VERSION}/config
  366.     cp Makefile tcsh.reno-${VERSION}/Makefile.new
  367.     tar cvf - tcsh.reno-${VERSION} | compress > tcsh.reno-${VERSION}.tar.Z
  368.     rm -rf tcsh.reno-${VERSION}
  369.  
  370. ftp: tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z
  371.     cp tcsh-${VERSION}.tar.Z tcsh.tahoe-${VERSION}.tar.Z ${FTPAREA}
  372.     cp tcsh.man ${FTPAREA}
  373.  
  374. #
  375. # Dependencies
  376. #
  377. config.h: config_f.h
  378.  
  379. TCH=tc.h tc.const.h tc.decls.h tc.os.h tc.sig.h
  380. SHH=sh.h sh.types.h sh.char.h sh.err.h sh.dir.h sh.proc.h pathnames.h \
  381.     sh.decls.h ${TCH}
  382. TWH=tw.h tw.decls.h
  383. EDH=ed.h ed.decls.h
  384.  
  385. # EDH
  386. EDINC=sh.${SUF} sh.func.${SUF} sh.lex.${SUF} sh.print.${SUF} sh.proc.${SUF} \
  387.       sh.set.${SUF} tc.bind.${SUF} tc.os.${SUF} tc.prompt.${SUF} \
  388.       tc.sched.${SUF} tw.parse.${SUF}
  389. ${EDOBJS} ${EDINC} : ${EDH}
  390.  
  391. # SHH
  392. ${OBJS}: config.h ${SHH}
  393.  
  394. # TWH
  395. TWINC=ed.chared.${SUF} ed.inputl.${SUF} sh.exec.${SUF} sh.func.${SUF} \
  396.       sh.set.${SUF} tc.func.${SUF}
  397. ${TWOBJS} ${TWINC}: ${TWH}
  398.  
  399. # glob.h
  400. glob.${SUF} sh.glob.${SUF}: glob.h
  401.  
  402. # ed.defns.h
  403. EDDINC=tc.bind.${SUF} tc.func.${SUF} tc.os.${SUF}
  404. ${EDOBJS} ${EDDINC}: ed.defns.h
  405.